package com.fs.service.bo.room;

import com.fs.entity.Room;
import com.fs.service.bo.shop.BoShop;
import lombok.Data;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

@Data
public class BoRoom {
    private Integer id;
    private String name;
    private float price;
    private LocalDateTime createDate;
    private BoShop shop;

    public BoRoom() {
    }

    public BoRoom(Room room) {
        this.id = room.getId();
        this.name = room.getName();
        this.price = room.getPrice();
        this.createDate = room.getCreateDate();
        try {
            this.shop = new BoShop(room.getShop());
        } catch (Exception ignored) {
        }

    }
}
